#!/usr/bin/python
# -*- coding: utf-8 -*-

class Sanjiaoxing(object):
    def __init__(self, num):
        self.num = num

    def right_sanjiaxing(self):
        for i in range(self.num):
            a = '*' * i
            i += 1
            print(a.rjust(5, ' '))

    def Up_down_sanjiaoxing(self):
        for i in range(self.num):
            a = '*' * (self.num - i)
            i += 1
            print(a)

    def Zheng_sanjiaoxing(self):
        for i in range(self.num):
            print(' ' * (self.num - i), '* ' * i)
            i += 1

    def Lingxing(self):
        for i in range(self.num):
            print(' ' * (self.num - i), '* ' * i)
            i += 1
        for a in range(self.num):
            print(' ' * a, '* ' * (self.num - a))
            a += 1



if __name__ == '__main__':
    result = Sanjiaoxing(5)
    result.Lingxing()
